package Test;

public class Demo05 {
    public static void main(String[] args) {
        String s = "dsafhsdfjkahgdhkjdafla";
        String s1="d";
        int count =0;
        while (s.indexOf(s1)!=-1){
            count++;
           s= s.substring(s.indexOf(s1)+s1.length());
        }
        System.out.println(count);
    }
}
